import request from '@/utils/request'
import { getToken } from '@/utils/auth'

// 获取下游补贴价签
export function getPartnerSubsidyPrice(params) {
  return request({
    url: '/wxh-cloud-rest/rest/' + getToken() + '/partner/subsidy/getPartnerSubsidyPrice',
    method: 'get',
    params: params
  })
}

// 获取基准价签
export function getChargeList(params) {
  return request({
    url: '/wxh-cloud-rest/rest/' + getToken() + '/charge/getChargeList',
    method: 'get',
    params: params
  })
}

// 保存下游补贴价签
export function savePartnerSubsidyPrice(data) {
  return request({
    url: '/wxh-cloud-rest/rest/' + getToken() + '/partner/subsidy/savePartnerSubsidyPrice',
    headers: { 'Content-Type': 'multipart/form-data' },
    method: 'post',
    data
  })
}

// 导入下游补贴价签
export function importPartnerSubsidyPrice(params) {
  return request({
    url: '/wxh-cloud-rest/rest/' + getToken() + '/partner/subsidy/import',
    method: 'get',
    params: params
  })
}

// 复制下游补贴价签
export function copyPartnerSubsidyPrice(params) {
  return request({
    url: '/wxh-cloud-rest/rest/' + getToken() + '/partner/subsidy/copyPartnerSubsidyPrice',
    method: 'get',
    params: params
  })
}

// 保存服务价签(多个)
export function saveSubsidyList(data) {
  return request({
    url: '/wxh-cloud-rest/rest/' + getToken() + '/partner/subsidy/save',
    headers: { 'Content-Type': 'multipart/form-data' },
    method: 'post',
    data
  })
}

// 删除下游补贴价签
export function removePartnerSubsidyPrice(params) {
  return request({
    url: '/wxh-cloud-rest/rest/' + getToken() + '/partner/subsidy/delete',
    method: 'get',
    params: params
  })
}
